-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiagID Control packet Handling #11
base: master
Are you sure you want to change the base?
Conversation
0a585df
to
ca8614f
Compare
Also can you update the commit message to follow the standard format within the diag project? Commit 1 should be something like:
Second Commit should look like:
|
3df5570
to
e6f5f30
Compare
e6f5f30
to
122e6b8
Compare
122e6b8
to
f61ef7e
Compare
116f8d0
to
8ea2c2d
Compare
Adding support for Diag-ID handshake and storing the information. Diag-ID indicates and indexes the identity of the clients. Signed-off-by: Kyle Deng <[email protected]>
Adding support for the diag-id command response Signed-off-by: Kyle Deng <[email protected]>
8ea2c2d
to
3b3bea7
Compare
Current state of the diag router is totally unusable from SM8450. |
@@ -38,6 +38,7 @@ | |||
#include "dm.h" | |||
#include "hdlc.h" | |||
#include "util.h" | |||
#include "diag_cntl.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these headers are in alphabetical order, move this under "diag.h"
struct diag_id_tbl_t *diag_id_item = NULL; | ||
struct list_head *diag_ids_head = NULL; | ||
uint8_t resp_buffer[DIAG_MAX_RSP_SIZE] = {0}; | ||
uint8_t *offset_resp = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
offset_resp does not need to be null initialized, the first use of it is to assign it to resp_buffer
struct list_head *diag_ids_head = NULL; | ||
uint8_t resp_buffer[DIAG_MAX_RSP_SIZE] = {0}; | ||
uint8_t *offset_resp = NULL; | ||
uint8_t process_name_len = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't used anymore?
@@ -117,11 +121,56 @@ static int handle_keep_alive(struct diag_client *client, const void *buf, | |||
return dm_send(client, resp, sizeof(resp)); | |||
} | |||
|
|||
static int handle_diag_id(struct diag_client *client, const void *buf, size_t len) | |||
{ | |||
struct diag_cmd_diag_id_query_req_t { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diag_id_query_req
uint16_t subsys_cmd_code; | ||
uint8_t version; | ||
} __packed; | ||
struct diag_cmd_diag_id_query_rsp_t { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diag_id_query_resp
I don't think we support this control packet on our downstream branch either. Will check with Kyle to see if he tested this on XElite |
Add support for DiagID V1, V2 and V3 Control Packet definitions and subsequent feature handling.